package org.pluslibs.framework.swingplus.jpanel;

import java.awt.Component;
import java.awt.LayoutManager;

import javax.swing.JPanel;

public class JPanelPlus extends JPanel {
    private static final long serialVersionUID = 9218373373812578736L;

    @Override
    public void setEnabled(boolean enabled) {
        super.setEnabled(enabled);
        for (Component component : getComponents()) {
            component.setEnabled(enabled);
        }
    }

    public JPanelPlus() {
        super();
    }

    public JPanelPlus(boolean isDoubleBuffered) {
        super(isDoubleBuffered);
    }

    public JPanelPlus(LayoutManager layout, boolean isDoubleBuffered) {
        super(layout, isDoubleBuffered);
    }

    public JPanelPlus(LayoutManager layout) {
        super(layout);
    }

    @Override
    public void setVisible(boolean b) {
        super.setVisible(b);
        for (Component component : getComponents()) {
            component.setVisible(b);
        }
    }

}
